using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class DemoView : BaseWindow<DemoView,DemoController>
{
    public Text text;

    
    [ContextMenu("妇女2")]
    public void Test()
    {
        var c =ViewManager.Instance.GetController<DemoController>(WinEnum.TestView1);
        c.Fun2();
    }
}

public class DemoController : BaseController
{
    private DemoView demoView;
    public override void SetView(BaseWindow v)
    {
        base.SetView(v);
        demoView = (DemoView) v;
    }

    public override void InitWindow()
    {
        base.InitWindow();
        demoView.text.text = "Nhao Moqi";
    }
    public  void Fun2()
    {
        demoView.text.text = "Fun2";
    }
}